-
Notifications
You must be signed in to change notification settings - Fork 132
Add check if plugin setup is completed #11549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #11549 +/- ##
=========================================
Coverage 40.44% 40.44%
- Complexity 5196 5200 +4
=========================================
Files 1083 1083
Lines 62996 62999 +3
Branches 8628 8630 +2
=========================================
+ Hits 25479 25482 +3
Misses 35224 35224
Partials 2293 2293 ☔ View full report in Codecov by Sentry. |
).also { cachedResult = it } | ||
} | ||
|
||
private fun isPluginSetupCompleted(paymentAccount: WCPaymentAccountResult): Boolean = | ||
paymentAccount.status == WCPaymentAccountResult.WCPaymentAccountStatus.COMPLETE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the decision (p91TBi-bje-p2), I've loosened the status requirement to ENABLED. I don't have a full understanding of all the status types though, so I'd appreciate it if you could confirm (@malinajirka or @kidinov) if the condition matches the following requirement:
- ...
- Onboarding is Completed (optional requirements should be considered as valid).
- ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for M1, it's planned to implement a "happy path" only, shall we assume that only the completed state is exacted for now? Handling optional requirements is done on å full-screen fragments, so it may bring some complexity to the initial implementation of connection/payment flows. In any case I added a ticket to handle that - we just need to decide priorities - for M1 or latter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing users to enter the POS with pending requirements but crashing (implementing only the happy path) sounds like a good approach for now. I've added high
priority label to the issue just to make sure we don't leave the code in the crashing state.
I've loosened the status requirement to ENABLED. I don't have a full understanding of all the status types though,
I believe this should be enough - we'll need to eventually test all the flows though. We had a pretty detailed test plan for the onboarding project so we should be able to look it up and re-use it.
I'm marking PR as a draft to wait for the final decision. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This PR updates conditions to show the POS entry point - now it's required that Woo Payments onboarding is complete.
Context: p91TBi-beb-p2#comment-12134
Testing instructions
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.